import { IMessageBase } from "../../Framework/MQ/IMessageBase";
import { MessageManager } from "../../Framework/MQ/MessageManager";
import { SerializeStream } from "../../Framework/Serialize/SerializeStream";
import { DictGuildGroupPlayerHelper } from "./DictGuildGroupPlayerHelper";
import { SEntityId } from "./SEntityId";
type int = number;
//class SGuildGroup
    
    export  class SGuildGroup extends IMessageBase
    {
        constructor(arg1: Boolean=false)
        {
            
            super();if (arg1) 
            {
                MessageManager.instance().regist(this);
            }
            return;
        }

        public /* override */ getType(): int
        {
            return this._type;
        }

        public /* override */ clone(): IMessageBase
        {
            return new SGuildGroup();
        }

        public /* override */ __write(arg1: SerializeStream): void
        {
            this.guildGroupId.__write(arg1);
            this.commanderId.__write(arg1);
            arg1.writeString(this.name);
            arg1.writeString(this.pwd);
            arg1.writeInt(this.copyCode);
            arg1.writeInt(this.guildId);
            DictGuildGroupPlayerHelper.write(arg1, this.players);
            return;
        }

        public /* override */ __read(arg1: SerializeStream): void
        {
            this.guildGroupId = new SEntityId();
            this.guildGroupId.__read(arg1);
            this.commanderId = new SEntityId();
            this.commanderId.__read(arg1);
            this.name = arg1.readString();
            this.pwd = arg1.readString();
            this.copyCode = arg1.readInt();
            this.guildId = arg1.readInt();
            this.players = DictGuildGroupPlayerHelper.read(arg1);
            return;
        }

        public /* const */_type: int=20415;

        public /* var */guildGroupId: SEntityId;

        public /* var */commanderId: SEntityId;

        public /* var */name: string;

        public /* var */pwd: string;

        public /* var */copyCode: int;

        public /* var */guildId: int;

        public /* var */players: Map<any, any> /* flash.utils.Dictionary */;

        public static /* var */_regist: SGuildGroup;
    }

            SGuildGroup._regist = new SGuildGroup(true);
        